home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / RCS / sig.h,v < prev    next >
Encoding:
Text File  |  1992-07-17  |  5.6 KB  |  218 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  srv030:1.2 srv027:1.2 srv026:1.2 srv024:1.2 srv021:1.2 srv019:1.2 srv018:1.2 srv016:1.2 srv014:1.2 srv010:1.2 srv008:1.2 srv007:1.2 srv006:1.2 srv005:1.2 srv004:1.2 srv003:1.2 srv002:1.2 srv001:1.2;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     92.02.28.19.55.54;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     92.01.31.17.37.22;  author kupfer;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @@
  22.  
  23.  
  24. 1.2
  25. log
  26. @MIG support.  Use function prototypes.
  27. @
  28. text
  29. @/*
  30.  * sig.h --
  31.  *
  32.  *     Data structures and used by the signal module for user system
  33.  *     calls.
  34.  *
  35.  * Copyright (C) 1985, 1988 Regents of the University of California
  36.  * Permission to use, copy, modify, and distribute this
  37.  * software and its documentation for any purpose and without
  38.  * fee is hereby granted, provided that the above copyright
  39.  * notice appear in all copies.  The University of California
  40.  * makes no representations about the suitability of this
  41.  * software for any purpose.  It is provided "as is" without
  42.  * express or implied warranty.
  43.  *
  44.  * $Header: /user5/kupfer/spriteserver/include/user/RCS/sig.h,v 1.1 92/01/31 17:37:22 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  45.  */
  46.  
  47. #ifndef _SIGUSER
  48. #define _SIGUSER
  49.  
  50. #ifndef _MiG
  51. #include <cfuncproto.h>
  52. #ifdef SPRITED
  53. #include <sigTypes.h>
  54. #else
  55. #include <sprited/sigTypes.h>
  56. #endif
  57. #endif
  58.  
  59. /*
  60.  * The different actions for signals.
  61.  * SIG_IGNORE_ACTION    Ignore the signal.
  62.  * SIG_KILL_ACTION    Kill the process.
  63.  * SIG_DEBUG_ACTION    Enter the debugger for the process.
  64.  * SIG_DEFAULT_ACTION    Take the default action.
  65.  * SIG_HANDLE_ACTION    Call a signal handler for the process.
  66.  * SIG_MIGRATE_ACTION    Migrate the process to another node.  The node
  67.  *                must have already been set.
  68.  * SIG_SUSPEND_ACTION    Suspend execution of the process.
  69.  */
  70. #define    SIG_IGNORE_ACTION    0
  71. #define    SIG_KILL_ACTION        1
  72. #define    SIG_DEBUG_ACTION    2
  73. #define    SIG_DEFAULT_ACTION    3
  74. #define    SIG_HANDLE_ACTION    4
  75. #define    SIG_MIGRATE_ACTION    5
  76. #define    SIG_SUSPEND_ACTION    6
  77.  
  78. #define    SIG_NUM_ACTIONS        7
  79.  
  80. /* sizeof(Sig_Action)/sizeof(int), for use by MIG. */
  81. #define SIG_ACTION_SIZE        3
  82.  
  83. #ifndef _MiG
  84.  
  85. /* 
  86.  * The type of a Sprite signal handler.
  87.  * XXX Should Sig_Context be the same as struct sigcontext?
  88.  */
  89.  
  90. typedef int (*Sig_HandleProc)_ARGS_((int spriteSig, int spriteCode,
  91.         Sig_Context *sigContextPtr, Address sigAddr));
  92.  
  93. /*
  94.  * The structure to use to specify the action to take for a signal.
  95.  */
  96. typedef    struct {
  97.     int        action;
  98.     Sig_HandleProc handler;    /* ptr to signal handler */
  99.     int        sigHoldMask;
  100. } Sig_Action;
  101.  
  102. #endif /* _MiG */
  103.  
  104. /*
  105.  * The different signals.
  106.  *
  107.  * SIG_DEBUG        Enter the debugger.
  108.  * SIG_ARITH_FAULT    Arithmetic instruction fault (e.g., division by zero).
  109.  * SIG_ILL_INST        Illegal instruction.
  110.  * SIG_ADDR_FAULT    Bad operand address.
  111.  * SIG_KILL        Kill the process.
  112.  * SIG_INTERRUPT    Interrupt the process.
  113.  * SIG_BREAKPOINT    A breakpoint trap exception.
  114.  * SIG_TRACE_TRAP    A trace trap exception.
  115.  * SIG_MIGRATE_TRAP    A migration trap exception (privileged).
  116.  * SIG_MIGRATE_HOME    Signal a process to return home after migration.
  117.  * SIG_SUSPEND        Suspend execution.
  118.  * SIG_RESUME        Resume execution after being suspended.
  119.  * SIG_TTY_INPUT    Signal to a background process that tries to read
  120.  *            from the tty.
  121.  * SIG_PIPE        The reader of a pipe has died.
  122.  * SIG_TIMER        An timer set with Proc_SetIntTimer has expired.
  123.  * SIG_URGENT        Urgent condition (i.e., out-of-band data) is present 
  124.  *            on a socket
  125.  * SIG_CHILD        A child's status has changed.
  126.  * SIG_TERM        Software termination.
  127.  * SIG_TTY_SUSPEND    Suspend signal from keyboard.
  128.  * SIG_TTY_OUTPUT    Signal to a background process that tries to write
  129.  *            to the tty when that has been dis-allowed.
  130.  */
  131. #define    SIG_DEBUG        1
  132. #define    SIG_ARITH_FAULT        2
  133. #define    SIG_ILL_INST        3
  134. #define    SIG_ADDR_FAULT        4
  135. #define    SIG_KILL        5
  136. #define    SIG_INTERRUPT        6
  137. #define    SIG_BREAKPOINT        7
  138. #define    SIG_TRACE_TRAP        8
  139. #define    SIG_MIGRATE_TRAP     9
  140. #define    SIG_MIGRATE_HOME     10
  141. #define    SIG_SUSPEND        11
  142. #define    SIG_RESUME        12
  143. #define    SIG_TTY_INPUT        13
  144. #define SIG_PIPE        14
  145. #define SIG_TIMER        15
  146. #define SIG_URGENT        16
  147. #define SIG_CHILD        17
  148. #define SIG_TERM        18
  149. #define    SIG_TTY_SUSPEND        19
  150. #define SIG_TTY_OUTPUT        20
  151.  
  152. /*
  153.  * Define the bounds on signals.
  154.  *
  155.  * SIG_MIN_SIGNAL            The smallest valid signal.
  156.  * SIG_LAST_RESERVED_SIGNAL        All signals after this one can be user
  157.  *                    defined.
  158.  * SIG_NUM_SIGNALS            The total number of signals.
  159.  */
  160. #define    SIG_MIN_SIGNAL            1
  161. #define    SIG_LAST_RESERVED_SIGNAL    SIG_TTY_OUTPUT
  162. #define    SIG_NUM_SIGNALS            32
  163.  
  164. /*
  165.  * A code of zero indicates that there is no code for the signal.
  166.  */
  167. #define    SIG_NO_CODE        -1
  168.  
  169. /*
  170.  * The different standard codes for an illegal instruction signal
  171.  *
  172.  * SIG_ILL_INST_CODE    This was actually an illegal instruction.
  173.  * SIG_BAD_SYS_CALL    A bad system call number was passed to a system call
  174.  *            trap.
  175.  * SIG_BAD_TRAP        An illegal trap instruction was executed.
  176.  * SIG_PRIV_INST    A privledged instruction was executed.
  177.  */
  178. #define    SIG_ILL_INST_CODE    0
  179. #define    SIG_BAD_SYS_CALL    1
  180. #define    SIG_BAD_TRAP        2
  181. #define    SIG_PRIV_INST        3
  182.  
  183. /*
  184.  * The different standard codes for an address fault.
  185.  *
  186.  * SIG_ACCESS_VIOL    The address accesses a protected area of memory.
  187.  * SIG_ADDR_ERROR     The operand address is on an improper boundary.
  188.  */
  189. #define    SIG_ACCESS_VIOL        0
  190. #define    SIG_ADDR_ERROR        1
  191.  
  192. /*
  193.  * The standard codes for an arithmetic fault.
  194.  *
  195.  * SIG_ZERO_DIV        Division by zero.
  196.  */
  197. #define    SIG_ZERO_DIV        0
  198.  
  199. #endif /* _SIGUSER */
  200. @
  201.  
  202.  
  203. 1.1
  204. log
  205. @Initial revision
  206. @
  207. text
  208. @d16 1
  209. a16 1
  210.  * $Header: /sprite/src/lib/include/RCS/sig.h,v 1.4 89/07/31 17:41:18 mgbaker Exp $ SPRITE (Berkeley)
  211. d22 9
  212. d52 13
  213. d70 1
  214. a70 1
  215.     int        (*handler)();
  216. d73 2
  217. @
  218.